using UnityEngine;

public static class Matrix4x4Ex
{
	private const int dimension = 4;

	public static Matrix4x4 GetNewMatrix4x4(Vector4 row0, Vector4 row1, Vector4 row2, Vector4 row3)
	{
		Matrix4x4 result = default(Matrix4x4);
		result.SetRow(0, row0);
		result.SetRow(1, row1);
		result.SetRow(2, row2);
		result.SetRow(3, row3);
		return result;
	}

	public static Vector4 MultiplyByVector(Vector4 vector, Matrix4x4 matrix)
	{
		Vector4 zero = Vector4.zero;
		for (int i = 0; i < 4; i++)
		{
			Vector4 column = matrix.GetColumn(i);
			zero[i] = Vector4.Dot(vector, column);
		}
		return zero;
	}
}
